
import { observer } from 'mobx-react';
import * as React from 'react';
import { Spin } from 'antd';
import Drawer from '../../common/drawer';
import QuickTable from './QuickTable';
import {WeaLocaleProvider} from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;

@observer
export default class QuickTableDrawer extends React.Component {
    render() {
        const { store } = this.props;
        const width = document.documentElement ? document.documentElement.clientWidth : '100%';
        return (
            <Drawer
                visible={store.quickTableVisible}
                width={width}
                title={`ecology | ${getLabel('502318','快速建表') }`}
                onClose={store.hideQuickTable}
                className="cueb-quick-table-drawer"
                placement="left"
                hasScroll={false}
            >
                <Spin size="large" spinning={store.quickTableStore && store.quickTableStore.loading}>
                    <QuickTable store={store.quickTableStore} />
                </Spin>
            </Drawer>
        )
    }
}